package senior.ioExer;

import java.io.File;

/**
 * 输入一个文本文件名，将其删除。
 * @author shkstart
 * @creat 2022-04-14:46
 */
public class Exer3 {
    public static void main(String[] args) {
        //先查看有那些文件
        File file = new File("D:\\.temp");
        String[] strings = file.list();
        for(String str :strings){
            System.out.println(str);
        }
        //删除
        File delFile = new File("D:\\.temp\\exer3.txt");
        boolean delete = delFile.delete();
        System.out.println("是否删除成功：" + delete);

    }

}
